package ichain_sdk

import (
	"git.cloud.inspur.com/ichain/ichain-sdk-go/pkg/core/logging/api"
	"git.cloud.inspur.com/ichain/ichain-sdk-go/pkg/core/logging/modlog"
	sdkApi "git.cloud.inspur.com/ichain/ichain-sdk-go/pkg/ichain_sdk/api"
	"git.cloud.inspur.com/ichain/ichain-sdk-go/pkg/ichain_sdk/factory/defcore"
	"git.cloud.inspur.com/ichain/ichain-sdk-go/pkg/ichain_sdk/factory/defiam"
	"git.cloud.inspur.com/ichain/ichain-sdk-go/pkg/ichain_sdk/factory/defsvc"
)

type pkgSuite interface {
	Core() (sdkApi.CoreProviderFactory, error)
	IAM() (sdkApi.IAMProviderFactory, error)
	Service() (sdkApi.ServiceProviderFactory, error)
	Logger() (api.LoggerProvider, error)
}

type defPkgSuite struct{}

func (ps *defPkgSuite) Core() (sdkApi.CoreProviderFactory, error) {
	return defcore.NewProviderFactory(), nil
}

func (ps *defPkgSuite) IAM() (sdkApi.IAMProviderFactory, error) {
	return defiam.NewProviderFactory(), nil
}

func (ps *defPkgSuite) Service() (sdkApi.ServiceProviderFactory, error) {
	return defsvc.NewProviderFactory(), nil
}

func (ps *defPkgSuite) Logger() (api.LoggerProvider, error) {
	return modlog.LoggerProvider(), nil
}
